package com.icongyou.enterprise.common.dictionary;

import lombok.Getter;

@Getter
public enum UserStatusEnum {
    DISABLED(0, "禁用"),
    ENABLED(1, "启用");

    private final Integer value;
    private final String description;

    UserStatusEnum(Integer value, String description) {
        this.value = value;
        this.description = description;
    }

    public static UserStatusEnum getByValue(Integer value) {
        for (UserStatusEnum status : UserStatusEnum.values()) {
            if (status.getValue().equals(value)) {
                return status;
            }
        }
        return null;
    }
}